import request from '@/utils/request'

// 查询库存列表
export function listInventorys(query) {
  return request({
    url: '/system/inventorys/list',
    method: 'get',
    params: query
  })
}

// 查询库存详细
export function getInventorys(id) {
  return request({
    url: '/system/inventorys/' + id,
    method: 'get'
  })
}

// 新增库存
export function addInventorys(data) {
  return request({
    url: '/system/inventorys',
    method: 'post',
    data: data
  })
}

// 修改库存
export function updateInventorys(data) {
  return request({
    url: '/system/inventorys',
    method: 'put',
    data: data
  })
}

// 删除库存
export function delInventorys(id) {
  return request({
    url: '/system/inventorys/' + id,
    method: 'delete'
  })
}

// 刷新库存
export function refreshInventory(id) {
  return request({
    url: '/system/inventorys/refreshInventory',
    method: 'post',
    data: {id:id},
  })
}
